#ifndef _PHYSICSBODY_HPP
#define _PHYSICSBODY_HPP

#include "Maths.hpp"

class PhysicsBody
{
	// Transform
	Xform  m_xform;
	// Physics variables
	Vector m_vel, m_force;
	Scalar m_mass;
	Scalar m_angvel, m_torque;
	Scalar m_rot_inertia;
public:
	
	inline const Xform& getXform() const { return m_xform; }
	inline Xform&       getXform()       { return m_xform; }
	inline void         setXform(const Xform& xform)
	{ m_xform = xform; }
	
	inline const Vector& getPos() const      { return m_xform.getPos(); }
	inline Vector&       getPos()            { return m_xform.getPos(); }
	inline void          setPos(const Vector& pos)
	{ m_xform.setPos(pos); }
	
	inline const Orientation& getOri() const { return m_xform.getOri(); }
	inline Orientation&       getOri()       { return m_xform.getOri(); }
	inline void               setOri(const Orientation& ori)
	{ m_xform.setOri(ori); }
	
    // Bounding volumes
    const AABB&   getAABB() const;
    const OBB&    getOBB() const;
    const Circle& getBoundingCircle() const;
};

};

typedef std::vector<PhysicsBody*> PhysicsBodyCollection;
typedef PhysicsBodyCollection::iterator PhysicsBodyIter;

#endif //_PHYSICSBODY_HPP
